package com.framework.controller.system;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.framework.controller.index.BaseController;
import com.framework.entity.LogFormMap;
import com.framework.plugin.PageView;
import com.framework.util.Common;

/**
 * 
 * @author framework 2015-11-19
 * @Email: g5874589652@126.com
 * @version 4.0v
 */
@Controller
@RequestMapping("/log/")
public class LogController extends BaseController {


	@RequestMapping("listOPUI")
	public String listOPUI(Model model) throws Exception {
		return Common.BACKGROUND_PATH + "/system/log/listOPUI";
	}

	@ResponseBody
	@RequestMapping("findByPage")
	public PageView findByPage(String draw, String length, String start) throws Exception {
		LogFormMap logFormMap = getFormMap(LogFormMap.class);
		String order = " order by id desc";
		logFormMap.put("$orderby",order);
		logFormMap.put("$search",getsearch());
		logFormMap.put("keyCloumn",  getKeyCloumn());
		logFormMap = toFormMap(logFormMap, draw, length, start);
		pageView=logFormMap.findByPage_Names(pageView);
		return pageView;
	}
}